package com.example.spring.config;

import com.example.spring.model.User;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.context.annotation.RequestScope;

/**
 * ClassName: BeanConfig
 * Package: IntelliJ IDEA
 * Description:
 *
 * @Author 谷京京
 * @Create 2024/4/11 11:09
 * @Version 1.0
 */
@Configuration
public class BeanConfig {
    @Bean
    public User user1() {
        return new User(1, "zhangsan");
    }

    @RequestScope
    @Bean
    public User requestUser() {
        return new User();
    }
}
